better naming for returned function, extension -> extendedFunction