added comments, deleted some methods