added more comments, removed unneeded methods