Solved problems 5-7