started porting quadrature stuff