added form tag to main, processin of the queries