refactored and removed the integration test