Implemented almost working inventory check