add support for quadrilaterals
small bug fixes