remove code redunduncy