move user name out of funct