avoid using namespace std in header files & bugfix in preaccumulation