Changed so that the variables are replaced by a method.