working version with new CMakeLists.txt