added winner functionality