making a change to ruby logic