gen_methods function

Generate methods for testing