added else condition