a sample problem switcher using nodejs