connecting main and form