added sg_typedefs