pid before implementing counter_prev