rewrite of proc