modify to use self instead of module_function
Merge branch 'work'