rewrite magic_fields extend