renamed 'types' variable