Effects of CO2 and acid gas injection on enhanced gas recovery and storage