added an isOccupied check for inventory just in case