sending data back to server working for strings and numbers