completed g2d library