added relevant code from msc, updated cover code and naming