modular API and API example added

- modular API added