A modified version of the work by jongwook et al.