added rep back to buffered writing