Added API functionality

callback is optional