final version for worksheet 3