replaced = through == in if statment