Working on format_text function