added feature to enable writing string from terminal