testing and fixes of api