adding planet array to DRY up this code