Functions needed to generate PreParams