stack uses vector instead of array
stack refactor
fixed comments