implementing life.h