use to_hash from module. only need to include it in the class where needs to call to_hash