Making function to find nucleus