move common token process codes into _tk. later I can deal with helper arguments here.