wrap the else with { }. ditto for other if/else statements too