add script to index page to make service/factory work