refactor for python package (in-progress)