Refactored previous commit