added unit and end-to-end/integration tests