change api to simplify client