remove 'stack', update CMakeLists.txt