added a cleaner/more readable version of the WC program