broke out prior creation scripting into separate function