almost have initialize resources working