end of stage 1, check for base case