modified the api to work better for customer user interface