tryin write code for Ruby