refactoring module APIs