cleaned up metafunction definitions