added some member variables as well as the function diag_inertia()