optimized some things

optimized lookahead a lil bit