Added nameText and some additional logic