implementation of conways game of life