changed equality logic