why use define_method instead of def?