function encode(point) {
  upperDigit = 126;
  lowerDigit = 33;
  //make coordinate into aray of digits
  a = point.split('');
  //make digits into numbers within bounds
  b = [];
  for (z=0;z<a.length;z++) {
    if (parseInt(a[z] + '' + a[z+1]) < (upperDigit-lowerDigit)) {
      b.push(parseInt(a[z] + '' + a[z+1]) + lowerDigit);
      z++;
    } else {
      b.push(parseInt(a[z]) + lowerDigit);
    }
  }
 //convert digits to characters
c = [];
for (z=0;z<b.length;z++) {
c[z] = String.fromCharCode(b[z]);
}
//convert the array to a string
d = '';
for (z=0;z<c.length;z++) {
d = d + c[z];
}

return d;
}