eric's attempt at finishing lookahead