inlined what little js there is