retooled javascript