added option for excluding values, additional tests