use determine_types to check for arrays rather than custom code