Get items function working