added crud functions to inventories controller