update api to have more function