improved RTL handling; to be tested