added distance2tip option in parent_position function