Added threshold detection functions
Increment version to 2.1.1