implemented packet uploading to server