adds an algorithm