now compiles for mingw on windows
changed shared_ptr to unique_ptr