version 0.2, javascript rewrite