roughly able to generate javascript