defined functions and selected elements from the DOM