Reverting old change where I changed buffer to a String