rewrite loader