change async call to sync