changed to sync mode