Stored the left upper corner and right bottom corner as points for the rectangle to make the code more readable