rewrote the computation for ABC in Rectangle, and now it seems to work. More testing will be done.