initalize resource