made comments, found some bugs