checking if D in reasonable range