working sdr input with validation
made SDR optional; if omitted sdr is not used in calcultion (more conservative)