refactored extension methods