moved some functionality from fun_instrumenter to sourcerer