add gettypes function