More efficient row assignment