update input buffer