refactored flight#miles and edited flights index