adding setcounter command at the beginning of protocol 3