Almost done with second version of fetch code