Fixes #15 - allow setting of threshold