implemented upto find-empty-point.