reorganized code to be more in line with ISIS
reorganized code to be more in line with ISIS