change variable codeid to token