added in contrast threshold support
tweaks