i am getting rectangle is [(8 , 8), (14 , 14)] when i run it

try `width = topRight.getX() - bottomLeft.getX();  then the same for height with Y and get rid of b1 code