Added rename method, name method can be copied from this method (see def
progr.)