change to sync method