added resistors and switches