[refactor] removed unnecessary attribute from stack's class
[add] test cases for stack