extend core objs with some sugar
problem 51 in Ruby