use define_method to create similar methods