added processing of the get and post queries