please add curly braces for both if and else.