Complete ex7 with working subassignments