new ruby
working solution