redefine code and function

redefine code and function