updated gap buffer