tightened up code added coverage