updated game of life code