weighted output in ruby works!