if/else/elseif now works right