Made some progress, but I am going to try to forget about the border and slightly modify the rect coords assignment eqs