Working on problem 329