handling type in comparedTo array