Added semaphores for read and aggregating data