update head and foot