fixed "if" brackets and else sentences format