used sample single process code as the basis