slight mods to rb file