use dictionary to save the call stack instead of string