pushed winning function
added a few comments