added sync flag