removed unnecessary if