Refactored previous implementations