do the hard stuff in ruby