write result in text