changed the way data will be sent from the client to fix encoding problem