added encoder for dali codes