adds server request code