changed comparison method