add format_text method