refactored duplicate statement