Finishing problem 1.
Adding rb file for problem 2.