javascript friendly modification