moved code to draw typing player name to separate function