Separated recursive block algorithm and test class