merge with spgt_t def, fix operator<<
working