use one function instead of complex if cycles. Detect installed decoding