some utilties for debugging