foundation 4 rewrite