add resource load code