US market closes with gains as investors breathe relief after Fed meeting