adding logic to populate the 'nickname' field