added an option to use virtual stock instead of physical stock