made modification to min_stack.rb