converts to functions