updating ruby subroutines