some contest logic