added else block