wc logic