What are the underlying important functions of mitosis and meiosis?