Added new algorithm and it gets correct answers!