converted flight app to creation pattern like java syntax