removed unnecessary set conversion in problem 50