slope-detection works