add stock function