refactor
refactor
add History, showHistory() in debug mode