Updated token functions