extracted api loading to separate file