change build system to cmake
add parallel functions back