spec and build custom function options for main module