removed redundent codes