testing refactored