adds inventory variable support. closes #784