changed buffer to allow string conversion