make regame function