added dealing with vertical to plane