A functional stock control