making visibility threshold configurable