Algorithm is implemented.

But doesn't work :) I think the error is coming from not handling thread
creaation and not filtering (is this possible) memory locations.