calling the returned function calls arg1.if if provided