The code from everyday r and ruby