removing unecessary check conditions