finished until 10, Part A (do_define_form) copied directly from Lydia's scheme.py