Added getSync method to flights

and fix formating code