got fetch function working