New function Rrestml