Made it even faster, problem 3 solved