clean up logic for meta