updated text formatting functions