methods code generation