try a full algo wip