Refactored title function for reals