how to create an automated inventory system