replace from String length to LinkedHashSet size
add save of command history