fixed multithreading bug, preparations for relaxed block matching
stub for testing rowwise costs
improved stub
relaxed block matching