add test
fix feature detection