add some functions to refactor