quick fix for threshold checking