handling only GET and POST