added messages handle and modified some code to use the messaging api when request is updated