add functionality to index.xhtml