Updated Client-Server part with JSON