updated synthesis algorithm