rewrite bifa