removing unnecessary logic