solutions for the first 8 exercises