initial code for text rendering