splitting the resistor into model and view