rewrite block api