solved problems 2-5