[Kerry] refactor code with module