moved cstat -> stat