remove unneeded func, use entity_metadata_wrapper #3226

#3226