tidied up varnames, checks for correct arguments
report number of unmatched words
gives a more helpful message on incorrect input