new wagn environment handling