making the form functional