adds functionality to the page