added generalized stocking code