perfectly working version counter