Refactored to use updated extension methods