metafunction clean-up