added function: replacing rm