Add envup and mcd functions