added repair function to rpgitem