init of qstate