added hook to manually set data sent to the server