added conviron functions to the main script