first running version.
!) seperate closed header to a .cc to reduce compling time
!) compiled working version, but with memory leak