Added a size parameter to the stack object