added method handling to Lexer, and created a test class