improved for ruby