problem with status_next_generation function