by code input from switches