; (B) to make subgrants to eligible local educational agencies or eligible entities under section 104; and (C) to assist eligible local educational agencies and eligible entities, when determined necessary by the State educational agency or at the request of an eligible local educational agency or eligible entity, in designing a comprehensive schoolwide improvement plan and carrying out the activities under section 104. (2) Funds for subgrants A State educational agency that receives a grant under this title shall use not less than 90 percent of the grant funds to make subgrants to eligible local educational agencies or eligible entities under section 104. (3) Middle grades need assessment (A) Comprehensive assessment (i) In general A State educational agency that receives a grant under this title shall conduct a comprehensive needs assessment that analyzes how to strengthen the programs, practices, and policies of the State to target support for students in the middle grades to improve positive student outcomes that prepare students for high school, postsecondary, and career success. (ii) Contracting ability A State educational agency receiving a grant under this title may enter into a contract, or similar formal agreement, to work with entities such as national and regional comprehensive centers (as described in section 203 of the Educational Technical Assistance Act of 2002 ( 20 U.S.C. 9602 )), institutions of higher education, or nonprofit organizations with demonstrated expertise in high-quality middle grades reform to conduct a comprehensive needs assessment. (B) Preparation of assessment In preparing the assessment under subparagraph (A), the State educational agency shall examine policies and practices of the State, and of local educational agencies within the State, affecting, with respect to middle grades— (i) curriculum alignment, assessment, and instruction