Edited rect.cpp