Fixed issue #32 to handle letter 'D'

Added the check for 'D' input