some comments in inputhistory.js