Refactored the overload solution