organizing that code