Adding function around the JS code
Adding function around the JS code