readd code from old branch seperating the fetch and import logic