Change buff into an array