now using event listeners for writing arrived flight to db