expansion; fortran code reorganize