Adapting to new extension function

Way better for extending