polish the api