 /**
  * Handel Read Input Registers (FC=04)
  * write back the values from analog in pins (input registers).
- *
- * handler functions must return void and take:
- *      uint8_t  fc - function code
- *      uint16_t address - first register/coil address
- *      uint16_t length/status - length of data / coil status
  */
-void readAnalogIn(uint8_t fc, uint16_t address, uint16_t length) {
-    // check the function code
-    if (fc == FC_READ_HOLDING_REGISTERS) {
-        // read eeprom memory
-        readMemory(address, length);
-        return;
-    }
-    
+void readAnalogIn(uint16_t address, uint16_t length) {
     // read analog input
     for (int i = 0; i < length; i++) {
         // write uint16_t value to the response buffer

     */
    slave.cbVector[CB_READ_COILS] = readDigitalIn;
    slave.cbVector[CB_WRITE_COIL] = writeDigitlOut;
    slave.cbVector[CB_READ_REGISTERS] = readAnalogIn;
    slave.cbVector[CB_WRITE_MULTIPLE_REGISTERS] = writeMemory;
    
    // start slave at baud 9600 on Serial

 * set digital output pins (coils) on and off
 */
void writeDigitlOut(uint8_t fc, uint16_t address, uint16_t status) {
    // set digital pin state
    digitalWrite(address, status);
}

/**
 * Handel Write Holding Registers (FC=16)
 * write data into program.
 */
void writeMemory(uint8_t fc, uint16_t address, uint16_t length) {
    uint16_t value;
