copied directive javascript  from old location