extract cannot be both method and function