refactored to test properly