simplified code by removing addonsOrder array