changed equality checks to old style