update query, move to footer include