add quadrilateral to rectangle codes