removed unnecessary logic