added explanations of methods.