adding Javascript code