data restructure, parms added
doc update
added testthat import
argument checking
updated match.arg usage