simple bigram parser without bugs