reorganize the source codes