Added ordering of pins