Refactored for sharing