changing comparedTo array to include type of data