fixed game of life, now works with any size square grid