Add basic threshold operation