reworking of api