add ability to pass data to sync method