add support for threshold plugin, closes #57