implemented the compiler for method forms