add removeRectangle and test