starter code for msort