Rearranging structure of the repo