source code refine version 1