fixed to single threaded
pep8 checked