write new upgrade system