started translating python to ruby