bug fix and startend point input