changed some comments, changed a variable to use less memory