how oil and natural gas were formed