swapped pins and added default input