update head rewrite