some changes to problem4