commented buffer code from chat