implementation of inventory related functionalities