Addes solutions for problems 6 & 7