refactored CMakeLists.txt