moves json parsing to its method