added history.length