implemented max_stack.rb; working