converted to be periodic and environment variable