flesh out a bit more of the javascript side of things