lab3 stack written