#29 refactor: isolate function for resource retriving from internet