Updated equality condition
Fixed the name of a variable