added new inventory code from ipad.