some more functions inc msort