single threaded computation after refactoring