quick use of protocols to implement a stack