removed unnecessary variable inventory