mashstirrer rewrite and testing