Added getwinnings function