redesigned g2d library