clean up lex loop a bit