Made problem 50 much faster