1-3 done in ruby