update algorithm tests
encapsulate contemporaries into a separate class