added a print method and changed the += concat to push into the buffer