updated example1.html and changed functions for example2 in index