fixing if else