tweaked history browse to use strlen function for code readility and performance