refine messageblocks and ref