solved problems 3 till 6