Add : stack class functions

Changed inhering from public to protected