adds a sync method