improve typing buffer