this php function in the footer should actually be php