added code for inserting text