added unit tests and ci