adapt to new rmisc functions