Rewriting code for block operations mode -_-