made it a bit more efficient by using bytes.Buffer (for concatenation) instead of string