add stock logic