moved key management draft into preflight function