Created first algorithm and tests for it.