js being rewritten