changed if != to ==