First step converting to Ruby