reorganization of file code