adding support for c++11 and using lambda expressions