removed unnecessary if else clause