Refactor phase 1
Refactor phase 1
bugfix
bugfix
bugfix
bugfix
bugfix
bugfix
bugfix
bugfix
bugfix
bugfix
bugfix
bugfix
bugfix
write stack
write stack
write stack
write stack
write stack