refactored codes. add else logic to conversionRate method.