updated inventory to use new orm