now using semaphors for syncing
fixed the sync so it doesn'tblock when inside of another sync block on the same syncronizer