My first take at inventory control