using lambda parametrized with templates