Added missing if-else clause and something elseo