Working through the logic of parser