added trail chars
added persistent history