how does the nucleus structure relate to its function