adjusting for possibility of empty userID