wc main seperated from wc functionality