changed where the initializae resources method is called