changed pin assignments and initialization