fixed some bugs (rdnr macro still bugged, using RNDr function instead)