Add code for textui