Refactored previous