add rectangular code