generalized saving data from forms and solved bugs with other uses