incorporate changes from https://github.com/kenshin23/CryptoSwitcher/commit/4dd4eef2bd3fef061a8d02a494863a754f1f732b