This is a final version of the Home Work #2 for Ruby Garage, Kyiv, Jan. 21st, 2013