Added $UPGRADE_DEPENDENCIES parameter