Adding an algorithm