start point && end point logic done