Changed if else to if