better api, enhance doc