Added the stack function to the package