tightened up some of the code