moving trivial partial functions to total functions