added auto hsv algorithm