implement rectangle tool.