moved the initial test logic inside of parser class