slight edit to problem 50