full rejigger of api