Added checking each pin