Solution to In-class activity 3