unit tests and base code