changed equlity for better performance