replace custom parallelization with internal golang locks