adding optFlags
adding initial resource objects