updated to do mass functions and mayavi visualisation routines