Please fix up the grammar errors in this sentence:
The development of advanced technology mainly was carried out by government agencies.
The development of advanced technology was mainly carried out by government agencies.