Finished problem 78 (but its slow)