code for worksheet 8