updating for non-threaded Python