adding javascript & short example of use