moved fetch to main method.