How to write a compound RX