add getValue method to return the items in the order they are sorted