improved integration test