add scanToTok utillity function to make finding parts of the struture easier