minor changes after looking over the code