just a set of JavaScript functions