implemented find-empty-point function