change code structure

change code structure