use stream operator where possible instead of C-style append function.