added important comment
splitted wincheck() in 4 small methods to reduce complexity