split fetch json to a new class