refactor survey creation code slightly