replaced function<> with template Op