added some comments and changed a method name