write some codes in ruby