updated to work with multiple MC files