add unit and integration tests