updated some old code to work with the latest m3-scala