made ruby version of 4