Cleaned up isotope function