function.js: update with coordinate map
Note: really have to stop copying and pasting code and learn this stuff correctly