added stock control