Added searchTypes() function