added js hooks