made some minor changes for stylistic consistency