rearrange block types to optimize performance