done: draft of "output js at correct positions"