abstract fetch function