move lambda into member function