first version (only work in the first time)