type class exercises