@Override
	public void set(String string) throws InterruptedException {
		
		//lock the object
		accessLock.lock();
		
		try{
			//while buffer is not empty, place thread in waiting state
			while(occupied){
					canWrite.await();
			}//end while	
			
			readStr = string;
			
			occupied = true;
			
			canRead.signalAll();
		}//end try
		finally{
			accessLock.unlock();
		}//end finally
	}//end method set