added max stage recording