r and rd should always be ints