write that in ruby