added support detection and conditional testing