changes to processRequest