changed to cmake
changed to smart pointers