fixed a mistake of forgotten removed old codes
removed redanduncy code