user input s and r working