add traceback to tostring
normalize function