refactored to use case