refactored stupidity