small changes on block match algo