added ability to test lists as well as strings