organize the code of experiment