tri-nary tree and my own StringToLong