a possibly faster synchronization function

added synchronize2 which is probably faster than
synchronize, but hasn't been tested yet