Wrote dispatch functions to manipulate requests and responses