modified the regtangle