clarify the API and fix bug