modifying to use WTForms