https://devhubby.com/thread/how-to-get-first-two-elements-of-a-stack-in-swift