added winning function, still doesn't function
correctly...