added a couple of Naz's suggestions for cleaning up the commit