void insertFixUP(final RedBlackNode justInsertedNode)
    {
    	RedBlackNode z = justInsertedNode;
    	while(z.parent.color == RED)
    	{
    		if(z.parent == z.parent.parent.left)
    		{
    			RedBlackNode y = z.parent.parent.right;
    			
    			// case 1
    			if(y.color == RED)
    			{
    				z.parent.color = BLACK;
    				y.color = BLACK;
    				z.parent.parent.color = RED;
    				z = z.parent.parent;
    			}
    			else
    			{
    				// case 2
    				if (z == z.parent.right)	
    				{
    					z = z.parent;
    					leftRotate(z);
    				}
    			
    				//case 3	
    				z.parent.color = BLACK;
    				z.parent.parent.color = RED;
    				rightRotate(z.parent.parent);
    			}
    		}
    		else if(z.parent == z.parent.parent.right)
    		{
    			RedBlackNode y = z.parent.parent.left;
    			
    			// case 4
    			if(y.color == RED)
    			{
    				z.parent.color = BLACK;
    				y.color = BLACK;
    				z.parent.parent.color = RED;
    				z = z.parent.parent;
    			}
    			else
    			{
    				// case 5
    				if (z == z.parent.left)	
    				{
    					z = z.parent;
    					rightRotate(z);
    				}
    			
    				//case 6	
    				z.parent.color = BLACK;
    				z.parent.parent.color = RED;
    				leftRotate(z.parent.parent);
    			}
    		}
    	}
    	
    	root.color = BLACK;
    }