expanded the json communication between client and server