problem 4 (with guess class)