added test cases for if without else