reworked to CAP