second step to multi threading
improved WHERE command and multi-threading behavior, bug fixes, etc.