separate utils.h and update CMakeLists.txt