added some comments, fixed some methods