Fix param setting

well, this is more cryptic for me then using each. Even reduce is not also much straight forward. Maybe we can create some extension in ruby bindings?