Function rm4