flight simulation, refactor