added Token enum; set up high level functions