added 2D distsnce transform