move sector generation to its own file