hook up form to functions