replace static token with generated