updated functions and footer