add resource load logic