removed redundent code