Refactored (get-subserves)

do the end-index calculation inside the let