added worker threads for ripley and histogram calculation