Selected pins are put on top of the stack