private boolean unlock(Element element1, Element element2, Element element3) throws AlreadyUnlockedElementException{
		//If any one of the elements passed as the parameter is null, then the programmer intents to release locks after performing
		//"Insert After" or "Insert Before" operation. If none of the elements passed as the parameters are pointing
		//to null, then the programmer intents to release locks after performing "Delete" operation.
		
		//variables defined for keeping track of the unlock states of the elements
		boolean unlock1 = false;
		boolean unlock2 = false;
		boolean unlock3 = false;
		
		if(element1 == null)
			unlock1 = true;
		else{
			{
				synchronized (element1) {
					if(element1.isLocked == false)
						unlock1 = false;
					else{
						element1.isLocked = false;
						unlock1 = true;
					}
				}
				
			
		}
	
		if(element2 == null)
			unlock2 = true;
		else{
			synchronized (element2) {
				if(element2.isLocked == false)
					unlock2 = false;
				
				else{
					element2.isLocked = false;
					unlock2 = true;
				}
			
			}
				
		}
		
		if(element3 == null)
			unlock3 = true;
		else{
			
			synchronized (element3) {
				if(element3.isLocked == false)
					unlock3 = false;
				else{
					element3.isLocked = false;
					unlock3 = true;
				}
			}
			
				
			
		}
		
		if((unlock1 == false) || (unlock2 == false) || (unlock3 == false))
			throw new AlreadyUnlockedElementException();
		else{
			synchronized (element2) {
				notifyAll();
			}
		}
		
		}
		return true;
	}