added moonthread struct