made the form functional