Code for Joseph, Carley and Hong (2013)