reorganise code
reorganise code