changed return types and token/lexeme checker functions