added a debug option to rectangle