Updated the meanstorisk to fix the table and graph to use the new function