moved unit tests to a separate file.