initial implementation and test for the last step of the backbone algo