Added semaphores to ensure that all attempt pages are recieved before serving the data to client