saving stages of gen_token (looking for a bug)