add javascript hoisting