implement RTL/RTR (complete) (contributes to #22)