refine block implementation