added javascript hook