adding simplified api, adding unit tests
implement simplified APIs