Refactored but still same error