minor improve on api