divide the file into some small parts according to their different function