change to only use code from js-beautify