added output streams. switched to cmake