completed findPrevStart function