Adding equlity check for squar and a rectangle