 renderMagic = (localScores) !->
 	Obs.observe !->
 		userCurrent = localScores.get('counters', App.userId())
-		if userCurrent >= MAGICNUMBER and userCurrent < MAGICNUMBER + 1000
+		if userCurrent >= FINALNUMBER and userCurrent < FINALNUMBER + 1000
 			Dom.div !->
 				Dom.animate
 						create:

				onTap: !-> App.showMemberInfo(userId)
			Dom.div !->
				Dom.style marginLeft: '10px', Flex: 1
				Dom.text App.userName(userId) + " 👑" if counter.get()>= MAGICNUMBER
				Dom.text App.userName(userId) if counter.get()< MAGICNUMBER
			Dom.div !->
				Dom.text counter.get()

Plugin = require 'plugin'

BUFFER_TIME = 1000
FINALNUMBER = 1000000

exports.render = ->
	# create local copy of the scores
	localScores = Obs.create {}
	copied = {}
	started = Obs.create false
	finalReached = Obs.create (Db.shared.peek 'counters', App.userId() >= FINALNUMBER)
	Obs.observe !->
		Db.shared.iterate 'counters', (v) !->
			# just copy once!
