finished chapter7 exercises