first pass at unit tests complete... need to be tweaked ..