new method addNewUnit useful for plugins