Refine version handle
Refine code: add docstring