some exercises in ruby