wip functions - still need to implement recursive functions and returning metatypes