added structure for writing text