working out username logic