Added a text drawing function