modify the api to make it easy to be used