finished first draft of isotope sorting