saner final function handling