update api to simplify GUI