clean up loop of subroutine parse.