changed position of retrieving username