roughly implemented block-wise operations