Add threshold to enter dim

add setting