game of life before refactoring