implementing new form and button logic