Modified the api to cover all the publicfunctions