added exception for else part and handling it in test too