extract token length