Winning rules included, better code structuring

optimization still needed...