Adding a couple problems in ruby