Add rmds and rmpyc functions