changing how we generate codes