improve extension method